<?php 
header("Content-Type: text/html; charset=UTF-8");
if($this->session->userdata('language')){
    $this->lang->load('custom', $this->session->userdata('language'));
}else{
    $this->lang->load('custom', 'english');
} 
?>
<!DOCTYPE HTML>
<?php
date_default_timezone_set("PRC");
?>
<html>
<head>
    <title><?=$this->lang->line('Clinic Name')?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <script type="text/javascript" src="<?=base_url()?>resource/js/jquery.js"></script>
    <script type="text/javascript" src="<?=base_url()?>resource/js/jquerysession.js"></script>
    
    <link rel="stylesheet" href='<?=base_url()?>resource/css/style.css' type="text/css"/>
    
    <link rel="stylesheet" type="text/css" href="<?=base_url()?>resource/css/jquery.datetimepicker.css" />
    <script src="<?=base_url()?>resource/js/jquery.datetimepicker.js"></script>
    
    <link rel="stylesheet" type="text/css" href="<?=base_url()?>resource/css/jquery.autocompleter.css" />
    <script src="<?=base_url()?>resource/js/jquery.autocompleter.js"></script>
<script>
$(function(){
    $('.language').click(function(){
        var language = $(this).attr('iid');
        var para = 'language='+ language;
        $.ajax( {    
            url:'<?=base_url()?>index.php/user/set_language',// 跳转到 action    
            data:para,    
            type:'post',    
            cache:false,    
            dataType:'json',    
            success:function(data) {    
                if(data.msg){ 
                    window.location.reload();    
                }else{    
                    window.location.reload(); 
                }    
             }  
        }); 
    });
});
</script>
</head>
<body>
<table class="maintable">
    <tr>
        <td class="toptd">
            <div class="header">
                <div class="logo alignleft">
                </div>
                <div class="logininfo alignright">
                    <table>
                        <tr>
                            <td><img src="<?=base_url()?>resource/img/portrait.png" width="20" height="17"/></td>
                            <td><label style="font-size:12px;">welcome <?=$this->session->userdata('user')->username?></label></td>
                            <!--<td class="pointer"><img src="<?=base_url()?>resource/img/icon-message.png" width="20" height="20"/><label class="pointer" style="vertical-align:super;font-size:10px;">12</label></td>-->
                            <td style="padding-left:10px;"><a href="<?=base_url('user/logout')?>" style="font-size:12px;color:white;text-decoration:underline;">Log Out</a></td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <div style="float:right; font-size:12px; margin-top:2px;">
                                    &nbsp;&nbsp;
                                   <a class="language" style="cursor:pointer;" iid="chinese">[中文]</a>
                                   <a class="language" style="cursor:pointer;" iid="english">[English]</a>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </td>
    </tr>
    <tr>
        <td class="contenttd" valign="top">
            <div class="content">
                <table class="contenttable">
                    <tr>
            


        
